package cn.kzgg.ymcc.feign.pullBlack;

import cn.kzgg.ymcc.domain.User;
import cn.kzgg.ymcc.result.JSONResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class BlackUserFeignClientFallbackFactory implements FallbackFactory<BlackUserFeignClient> {

    @Override
    public BlackUserFeignClient create(Throwable throwable) {
        return new BlackUserFeignClient() {
            @Override
            public User goBlack(Long id) {
                throwable.printStackTrace();
                return null;
            }
        };
    }
}
